home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / DB_CLIPP / 2614.ZIP / DISPLA.ZIP / TEST_S87.PRG < prev   
Text File  |  1990-11-30  |  1KB  |  38 lines

  1. @ 0,0 CLEAR
  2.  
  3. cInFile   = "display.doc "     && filename must have extension
  4. cKey      = ""                 && key pressed when dispfile() exits
  5. nNColor   = 7                  && foreground color
  6. nHColor   = 15                 && background color
  7. nColSkip  = 5                  && how many columns to move for left/right arrow
  8. nRMargin  = 132                && max line size
  9. cExitKeys = "AaBbC       "     && keys that can terminate routine
  10. lBrowse   = .f.
  11.  
  12. @ 0,0  SAY "Enter filename: "   GET cInFile
  13. @ 1,0  SAY "    Foreground: "   GET nNColor   PICTURE "999"
  14. @ 2,0  SAY "     Highlight: "   GET nHColor   PICTURE "999"
  15. @ 3,0  SAY "     Exit keys: "   GET cExitKeys
  16. @ 1,40 SAY "column increment: " GET nColSkip  PICTURE "999"
  17. @ 2,40 SAY "   max line size: " GET nRMargin  PICTURE "999"
  18. @ 3,40 SAY "     browse mode? " GET lBrowse   PICTURE "Y"
  19.  
  20. READ
  21.  
  22. *
  23. * remember a window will be one size less and greater than the passed coord.'s
  24. *
  25. * the 9th parameter contains the keys that the routine will terminate on
  26. * and the CHR(143) represents the F3 key.
  27. *
  28.  
  29. @ 4,9 TO 11,71
  30.  
  31. cKey = DispFile(cInFile, 5, 10, 10, 70, 1,;
  32.                 nNColor, nHColor, cExitKeys + CHR(143),;
  33.                 lBrowse, nColSkip, nRMargin)
  34.  
  35. @ 20,0 SAY "Key pressed was: " + '[' + cKey + ']'
  36.  
  37. QUIT
  38.